1. Field of the Invention
The present invention relates to a data processing apparatus, a method for controlling the data processing apparatus, and a computer-readable storage medium.
2. Description of the Related Art
Recently, data processing apparatuses for processing image data resulting from scanning of an original image have been used. The data processing apparatuses of this kind scan original image information with a scanner or the like and temporarily store the original image data in a memory. The data processing apparatuses also store image data of a print job transmitted from each client via a network in the memory.
Image processing, such as reduction, enlargement, and rotation of the image, is then performed on the image data stored in the memory in accordance with a user's request. In this manner, the data processing apparatuses can output an image of the original document based on the processed image data.
The data processing apparatuses of this kind require a technique for efficiently transferring image data using a memory and a technique for rendering transmitted print data using the memory.
FIG. 12 is a block diagram showing an example of a configuration of a data processing apparatus 10000 according to the related art. The data processing apparatus 10000 uses a memory of this kind.
The data processing apparatus 10000 has a central processing unit (CPU) bus 1 shown in FIG. 12. The CPU bus 1 is connected to a system control section 2, a memory control section 3, a direct memory access controller (hereinafter, abbreviated as “DMAC”) 4, an image scanning section 5, an image forming section 6, an image rendering section 7, and a communication section 8.
The system control section 2 connected to the CPU bus 1 includes a CPU 2a, a read-only memory (ROM) 2b, a random access memory (RAM) 2c, and an operation unit 2d. The CPU 2a controls the data processing apparatus 10000. A control program executed by the CPU 2a is stored in the ROM 2b. The RAM 2c is a memory temporarily used by the CPU 2a to execute arithmetic processing and to execute the control program.
For example, the CPU 2a writes a control command in the RAM 2c in response to output of the control command, such as an activation command of the image scanning section 5, the image forming section 6, and the image rendering section 7. Upon receiving a notification of completion of writing of image data, the CPU 2a determines whether the notification corresponds to the control command.
The operation unit 2d serves as an interface between a user and the data processing apparatus 10000. The CPU 2a executes predetermined data processing in accordance with an instruction supplied from the operation unit 2d. 
A memory controller 3a connected to the CPU bus 1 serves as an interface to an image memory 3b, which has a relatively large capacity sufficiently enough to store data of a plurality of pages. The memory controller 3a is connected to the image memory 3b through a memory bus 3c. 
Although not shown, encoded data is also stored by performing encoding processing. The DMAC 4 executes data transfer between devices without through the CPU 2a and can execute data transfer at a higher rate than the CPU 2a. 
The image scanning section 5 connected to the CPU bus 1 has a scanner interface (I/F) 5a, a scanner unit 200, and a page memory 5b. 
The scanner I/F 5a controls driving of the scanner unit 200 and controls writing and reading of image data (DATA) in the page memory 5b. 
The page memory 5b stores image data of one page supplied from the scanner unit 200. The page memory 5b is used to adjust data transfer rates of the scanner unit 200 and the CPU 2a and improve utilization efficiency of the CPU bus 1.
The image rendering section 7 connected to the CPU bus 1 receives a print job from an external apparatus connected to a network through the communication section 8, which serves as an interface to the network. A rendering unit 7a of the image rendering section 7 renders data contained in the received print job into data that can be handled by each processing section connected to the CPU bus 1 using a work memory 7b to execute rendering processing.
The image forming section 6 connected to the CPU bus 1 has a printer interface (I/F) 6a, a page memory 6b, and a printer unit 100.
The printer I/F 6a controls driving of the printer unit 100 and controls writing and reading of image data in the page memory 6b. 
The page memory 6b stores data of one page to be written in the printer unit 100. The page memory 6b is used to adjust data transfer rates of the printer unit 100 and the CPU 2a and improve utilization efficiency of the CPU bus 1.
Operation performed by the data processing apparatus 10000 will now be described.
A copy operation for copying a one-page original document will be described first.
Upon receiving a copy instruction from the operation unit 2d, the CPU 2a instructs the image scanning section 5 to drive the scanner unit 200. In response to this instruction, the scanner I/F 5a drives the scanner unit 200 to acquire image data of the original document from the scanner unit 200 and stores the image data in the page memory 5b. After storage of the image data of one page in the page memory 5b, the scanner I/F 5a notifies the CPU 2a of completion of scanning of the image data.
Upon receiving this notification, the CPU 2a instructs the DMAC 4 to transfer the image data from the scanner I/F 5a to the printer I/F 6a. 
The image data of one page is then transferred from the page memory 5b to the page memory 6b. After completion of the transfer of the image data of one page, the DMAC 4 notifies the CPU 2a of completion of the transfer.
Upon receiving this notification, the CPU 2a instructs the image forming section 6 to drive the printer unit 100. In response to this instruction, the printer I/F 6a reads out the image data from the page memory 6b and outputs the image data to the printer unit 100. The printer unit 100 can print an image of the original document on a sheet based on the image data of one page.
An operation for creating a plurality of copies of an original document including a plurality of pages will now be described.
Upon receiving an instruction from the operation unit 2d, the CPU 2a instructs the image scanning section 5 to drive the scanner unit 200. In response to this instruction, the scanner I/F 5a stores image data of one page acquired by the scanner unit 200 in the page memory 5b. The scanner I/F 5a then notifies the CPU 2a of completion of scanning of the image data of one page.
Upon receiving this notification, the CPU 2a instructs the DMAC 4 to transfer the image data. The image data stored in the page memory 5b is sequentially written in the image memory 3b through the memory controller 3a. 
The series of processing steps is repeated as many times as the number of the pages of the original document, whereby image data of all pages is stored in the image memory 3b. 
The stored image data is then sequentially read out from the image memory 3b in accordance with an instruction of the CPU 2a and is transferred to the printer I/F 6a. 
At this time, in response to storage of image data of one page in the page memory 6b from the image memory 3b by the DMAC 4, the CPU 2a instructs the printer I/F 6a to activate the printer unit 100.
After the printer I/F 6a transfers the image data of one page to the printer unit 100 in response to this instruction, the printer I/F 6a notifies the CPU 2a of completion of the transfer of the image data of the first page. Upon receiving this notification, the CPU 2a instructs the DMAC 4 to transfer image data of the next page. Printing of the image data is then started.
The series of processing steps is repeated as many times as the number of pages, whereby the first one copy of the original document is completed.
Since the CPU 2a is instructed to create a plurality of copies of the original document in this example, the CPU 2a instructs the DMAC 4 to transfer the image data of the first page to the printer I/F 6a from the image memory 3b again. Thereafter, the similar processing steps are repeated as many times as the specified number of copies, whereby a plurality of copies of the original document can be created.
An operation for printing a plurality of copies of print data contained in a print job received via a network will be described. Here, the print data is data of a plurality of pages.
The CPU 2a receives code data contained in the print job transmitted from a client terminal or the like with the communication section 8, which serves as an interface to an external network. The received code data is temporarily stored in the image memory 3b through the CPU bus 1 sequentially.
Upon completion of storage of code data of one page in the image memory 3b, the CPU 2a sequentially transfers the code data to the rendering unit 7a of the image rendering section 7 from the image memory 3b. 
The rendering unit 7a renders the code data into image data that can be handled by each processing section using the work memory 7b provided along with the rendering unit 7a and writes the image data in the work memory 7b. The rendering unit 7a then notifies the CPU 2a of completion of rendering of the print job of one page.
As in the case of the copy operation, the CPU 2a instructs the DMAC 4 to transfer the rendered image data. The image data stored in the work memory 7b is sequentially written in the image memory 3b. 
This series of processing steps is repeated as many times as the number of pages contained in the print job. In this manner, image data of all pages is stored in the image memory 3b. 
The image data stored in the image memory 3b is sequentially read out from the image memory 3b in accordance with an instruction of the CPU 2a and is transferred to the printer I/F 6a. 
At this time, once image data of one page is stored in the page memory 6b from the image memory 3b by the DMAC 4, the CPU 2a instructs the printer I/F 6a to activate the printer unit 100.
After the printer I/F 6a transfers the image data of one page to the printer unit 100 in response to this instruction, the printer I/F 6a notifies the CPU 2a of completion of the transfer of the image data of the first page. Upon receiving this notification, the CPU 2a instructs the DMAC 4 to transfer image data of the next page. Printing of the image data is then started.
As in the case of the copy operation, the series of processing steps is repeated as many times as the number of pages, whereby the first one copy of the print data is completed.
Since the CPU 2a is instructed to create a plurality of copies in this example, the CPU 2a instructs the DMAC 4 to transfer the image data of the first page to the printer I/F 6a from the image memory 3b again. By repeating the similar processing steps as many times as the specified number of copies thereafter, the plurality of copies can be printed.
Time needed by the rendering unit 7a to render the code data is decreasing thanks to a recent improvement in the rendering technique. Accordingly, when a plurality of copies are printed as in the above-described case, processing methods other than the method for rending and storing image data in the image memory 3b and reading out and using the stored image data may be employed to create the second and following copies. For example, there is a case where time for rendering code data of each page is shorter than predetermined time (e.g., time needed by the image forming section 6 to print the image data). In such a case, a technique for using smaller-size code data that is not rendered by the image rendering section 7 for data of the second and following copies is available (see Japanese Patent Laid-Open No. 2003-182164).
Code data that is sequentially written in the image memory 3b from the communication section 8 through the CPU bus 1 during a print job is a list of drawing instructions of objects existing in each page. In the related art, the print job data is stored as image data having undergone rendering of the rendering unit 7a. At the time of printing, the rendered image data is printed. However, since the above-described code data is easily edited (such as rotation, enlargement, reduction) for each object, the data processing apparatus 10000 may store both of the rendered image data and the code data.
Execution of a copy operation based on a copy function and execution of a print operation based on a print function may be requested at the same time in the data processing apparatus 10000 having the above-described configuration.
In such a case, two read/write operations (read processing and write processing) are executed in the image memory 3b. One is a read/write operation performed in the image memory 3b on image data transmitted from the image scanning section 5 during the copy operation. The other is a read/write operation performed on image data rendered by the image rendering section 7 during the print operation. When two read/write operations are simultaneously executed, the memory controller 3a has to perform time-division data transfer in the image memory 3b. 
As a result, data transfer rates of the copy operation and the print operation may reduce and performance of both of the operations may drop.
In addition, for example, there may be a case where execution of a preview operation performed on unrendered code data stored in the image memory 3b and execution of a print operation are requested at the same time.
In such a case, both operations require rendering processing performed by the rendering unit 7a of the image rendering section 7 and the read/write operation of the work memory 7b. Accordingly, the image rendering section 7 has to sequentially execute these operations.
Thus, when the preview operation is requested during execution of the print operation, the preview operation may not be executed until the previously executed print operation is completed.